package com.linkoog.devtools.code_generator.setting.configurable;

import com.linkoog.devtools.code_generator.setting.configurable.ui.TemplateVariablePanel;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.ConfigurationException;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.Nls.Capitalization;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;

public class TemplateVariableConfigurable implements Configurable {

    private TemplateVariablePanel contextPanel;

    @Override
    public @Nls(capitalization = Capitalization.Title) String getDisplayName() {
        return "Template Variable";
    }

    @Override
    public @Nullable JComponent createComponent() {
        if (contextPanel == null){
            contextPanel = new TemplateVariablePanel();
        }
        return contextPanel.getMyMainPanel();
    }

    @Override
    public boolean isModified() {
        return false;
    }

    @Override
    public void apply() throws ConfigurationException {

    }
}
